<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>Library management system</title>
    <style>
        body{
            background-image:url("https://img.17sucai.com/upload/55/2013-05-18/884aa4be28287056c7b5d6d075382c51.jpg?x-oss-process=style/big");
        }
        h1
        {
            color:orange;
            text-align:center;
        }

        div.margin
        {
            margin-top:50px;
            margin-bottom:100px;
            margin-right:400px;
            margin-left:400px;
        }

    </style>

</head>


<body>
<h1>管理员登陆界面</h1>
<div class="margin">


<form action="">

    Username: <input id="1" type="text" name="user"> <br>
    Password: <input id="2" type="password" name="password"><br>
<!--    <input type="button" value="登陆">-->

</form>
    <button onclick="login()">登陆</button>
    <img src="http://www.obzhi.com/wp-content/uploads/2020/12/tushuguan3-1024x576.jpg" width="512px" height="300px"/>


  <script type="text/javascript">
    function login(){

      var username = document.getElementById("1").value;
      var password = document.getElementById("2").value;

      if(username=="adminer" && password=="123"){
        alert("登录成功");
        window.location.href= "index2.html";
        // 前往图书列表界面
        return true;
      }
      else{
        alert("账号或密码错误");
        window.location.href= "index.html";
        return false;
      }
    }
  </script>

</div>



</body>
</html>
